package ownclasses;

import ij.IJ;

import java.awt.Point;

public class Pixel {
	
	Point point;
	float[] values;
	Cluster cluster;	

	public Pixel(Point point, float[] a) {
		this.point = point;
		values = a;
	}

	public void setCluster(Cluster newCluster) {
		if(cluster != null && newCluster != cluster)
		{
			//IJ.log("Remove from cluster");
			cluster.remove(this);
			cluster = newCluster;
		} else
		{
			cluster = newCluster;
		}
	}

	public float[] getValue() {
		return values;
	}
	
	public Cluster getCluster()
	{
		return cluster;
	}

	

}
